<script>
import {mapActions} from "vuex";

export default {
    name: "Info",
    // beforeMount() {
    //
    //     this.$store.dispatch("getAdminInfo");
    // }
    methods:{
        ...mapActions("admin",["getAdminInfo"]),
        ...mapActions("admin",{
            getInfo:"getAdminInfo"
        })
    },
    mounted() {
        // this.$store.dispatch("admin/getAdminInfo");
        // this.getAdminInfo();
        this.getInfo();
    }
}
</script>

<template>
<div>
    <img  :src="$store.state.admin.adminInfo.avatar | img" alt="">
    <p>用户名称：{{$store.state.admin.adminInfo.adminName}}</p>
    <p>注册时间：{{$store.state.admin.adminInfo.regTime}}</p>
    <p>最后登陆时间：{{$store.state.admin.adminInfo.loginTime}}</p>
</div>
</template>

<style scoped>

</style>